package com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position;

import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.dto.BusinessEmployeePositionHistoryListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.param.BusinessEmployeePositionHistoryCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.param.BusinessEmployeePositionHistoryDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.param.BusinessEmployeePositionHistoryListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.param.BusinessEmployeePositionHistoryUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 员工任职记录
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Employee Position History Management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessEmployeePositionHistoryCloudServiceFallback.class)
@RequestMapping("/business/employee/position/history")
public interface BusinessEmployeePositionHistoryCloudService {

    // 查询员工任职记录列表
    @ApiOperation(value = "Query Employee Position History List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.BusinessEmployeePositionHistoryCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessEmployeePositionHistoryListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Employee Position History List", dataType = "BusinessEmployeePositionHistoryListCloudParam", dataTypeClass = BusinessEmployeePositionHistoryListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessEmployeePositionHistoryListCloudDto list(BusinessEmployeePositionHistoryListCloudParam param);

    // 创建员工任职记录
    @ApiOperation(value = "Create Employee Position History", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.BusinessEmployeePositionHistoryCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Employee Position History", dataType = "BusinessEmployeePositionHistoryCreateCloudParam", dataTypeClass = BusinessEmployeePositionHistoryCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessEmployeePositionHistoryCreateCloudParam param);


    // 编辑员工任职记录
    @ApiOperation(value = "Update Employee Position History", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.BusinessEmployeePositionHistoryCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Employee Position History", dataType = "BusinessEmployeePositionHistoryUpdateCloudParam", dataTypeClass = BusinessEmployeePositionHistoryUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessEmployeePositionHistoryUpdateCloudParam param);


    // 删除员工任职记录
    @ApiOperation(value = "Delete Employee Position History", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.hr.employee.position.BusinessEmployeePositionHistoryCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Employee Position History", dataType = "BusinessEmployeePositionHistoryDeleteCloudParam", dataTypeClass = BusinessEmployeePositionHistoryDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessEmployeePositionHistoryDeleteCloudParam param);

}
